package cn.fan.mapper;

import cn.fan.pojo.FundData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface FundDataMapper extends BaseMapper<FundData> {
    @Select(" SELECT * from fund_data WHERE `code`= #{code} ORDER BY funddate desc LIMIT 0,1 ")
    FundData getMax(String code);

    @Select(" SELECT * from fund_data WHERE `code`= #{code} and `fundDate`= #{fundDate} LIMIT 0,1 ")
    FundData findByCodeDate(String code,String fundDate);
}
